<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>发布文章</title>
</head>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link href="css/sweet-alert.min.css" rel="stylesheet" />
<script src="js/sweet-alert.min.js"></script>
<link href="css/sweet-alert.min.css" rel="stylesheet" />
<script src="js/sweet-alert.min.js"></script>
<script type="text/javascript">
$(function(){
	$.post(
	"fl.do",
	function(data){   
		 for (var i = 0; i < data.length; i++) {
			 $("[name='fid']").append("<option value='"+data[i].fid+"'>"+data[i].fname+"</option>");
			 } 
	}   , 
	"json"
	);
});

</script>
<body> 
 <center><h1>添加书籍</h1></center>
 <div class="container">
	<div class="row clearfix">
		<div class="col-md-12 column">
		<form action="tj.do" method="post" enctype="multipart/form-data">
				<div class="form-group">
					 <label for="exampleInputEmail1">标题</label><input class="form-control" id="exampleInputEmail1"  name="biaoti"  placeholder="输入标题"/>
				</div>
				<div class="form-group">
					<input type=file name="myFile" style="display: none;" onchange="ye.value=value"><input name=ye style="color: green;border: 1px solid green"> <input type=button  value="选择图片" onclick=myFile.click() style="border: 1px solid green">
				</div>
				<div class="form-group">
				 <textarea rows="10" cols="182" name="leirong" placeholder="输入文章内容"></textarea>
				</div>
				<div class="form-group">
					<select class="form-control" style="width: 200px;"  name="fid">
								<option>--文章分类--</option>
							</select></div>
				<div class="form-group">
					 <label for="exampleInputEmail1">作者</label><input  placeholder="输入作者"class="form-control" id="exampleInputEmail1"  name="zuozhe" />
	 	</div>
				<button  onclick="add()" class="btn btn-default">发布文章</button>
			</form>
		</div>
	</div>
</div>
</body>
</html>